From: Toby Hughes Date: Mon, 26 Feb 2018 23:33:23 +0000 (-0800) Subject: Added tests for clean with verbose output X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~76^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=3a96d5c7a9e521810c356de0f9401ecaf767cc98;p=cargo.git Added tests for clean with verbose output --- diff --git a/tests/clean.rs b/tests/clean.rs index 0cf552371..824c3a3ad 100644 --- a/tests/clean.rs +++ b/tests/clean.rs @@ -237,3 +237,30 @@ fn registry() { assert_that(p.cargo("build"), execs().with_status(0)); } + +#[test] +fn clean_verbose(){ + let p = project("foo") + .file("Cargo.toml", r#" + [package] + name = "foo" + version = "0.0.1" + + [dependencies] + bar = "0.1" + "#) + .file("src/main.rs", "fn main() {}") + .build(); + + Package::new("bar", "0.1.0").publish(); + + assert_that(p.cargo("build"), + execs().with_status(0)); + assert_that(p.cargo("clean").arg("-p").arg("bar").arg("--verbose"), + execs().with_status(0).with_stderr("\ +[REMOVING] [..] +[REMOVING] [..] +")); + assert_that(p.cargo("build"), + execs().with_status(0)); +}